/*
 * copyright (c) 2009 Alexandr [Sn@ble] Surnin
 *
 * This file is part of FrameSeeker.
 *
 * FrameSeeker is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FrameSeeker is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You can read the full version of GNU LGPL in
 * http://www.gnu.org/copyleft/lesser.html
 */


#ifndef FSCOREMETHOD_H
#define FSCOREMETHOD_H

#include <QObject>
#include <QSettings>

#include "FSFrame.h"
#include "FSDefines.h"

#include <QDebug>


/** Generic method class
  * "Method" means "what we can do with video",
  * like output video to screen
  * or saving pictures to hard drive
  * or anything else
  * \author Alexandr [Sn@ble] Surnin
  */
class FSCoreMethod : public QObject {
    Q_OBJECT
public:
    FSCoreMethod();
    ~FSCoreMethod();

public slots:


    /** Virtual method...
      * override it in your subclass for
      * realizing your "method"
      */
    virtual void process();


    /** Set frame, we going to work with
      * \param _frame Current frame
      */
    void setFrame(FSFrame *frame);


    static void setTestingMode(bool tm);

    virtual void readSettings(QSettings *settings);

protected:
    FSFrame *prev;
    FSFrame *current;
    FSFrame *next;
    int needNext;

    static int testingMode;
};

#endif // FSCOREMETHOD_H
